import { ConnectionOptions } from 'typeorm';
import { RoutingControllersOptions } from 'routing-controllers';
import { Response } from 'koa';

export type OrmOptions = ConnectionOptions;

// jwt接口
export type JwtOptions = {
  secret?: string;
  expiresIn?: number | string;
};

// 加密接口
export type CryptOptions = {
  algorithm?: string;
  key?: string;
  iv?: string;
};

// 服务接口属性配置
export type KoaServerOptions = {
  port?: number;
  options?: RoutingControllersOptions;
};

// 请求响应数据类型
export type ResultOptions = {
  code: number | string;
  data?: any;
  message: string;
  token?: string;
};
